//1、引入fs模块  fs的写入实惠根据路径创建文件的
const fs = require('fs');
//2、简单文件写入 
fs.writeFile('./text1.text',"好好学习，天天向上！",{
    encoding:'utf-8',
    mode:0o666,
    flag:'w'
},err=>{
    if(!err){
        console.log('简单写入成功！');
    }else{
        console.log(err);
    }
})